<?php
//
//	file: includes/aucp/rank_fields.php
//	begin: 09/05/2007
//	$Author: christopher $
//	$Revision: 29 $
//	$Date: 2008-07-19 15:59:35 +0000 (Sat, 19 Jul 2008) $
//	license: http://opensource.org/licenses/gpl-license.php GNU General Public License (GPL)
//
//	description: rank cp fields

if (!defined('IN_PHPBB'))
{
	die("Hacking attempt");
}

class field_varchar_html extends field
{
	function init()
	{
		parent::init();
		$this->type = 'varchar';
	}

	function get_value($value)
	{
		return $this->encode(_read($this->name, TYPE_HTML, $this->decode($value), '', isset($this->data['form_only']) ? intval($this->data['form_only']) : 0));
	}
	function get_displayed_value()
	{
		return isset($this->data['output']) && $this->data['output'] ? $this->parse($this->value) : $this->form_escape_string($this->decode($this->value));
	}

	function encode($value)
	{
		return empty($value) ? '' : _htmlencode($value);
	}
	function decode($value)
	{
		return empty($value) ? '' : _htmldecode($value);
	}
	function parse($value)
	{
		return $value;
	}
}

?>